<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/8/4
  Time: 17:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>名人</title>
  </head>
  <body>
  <form action="queryAll" method="post">
    <span>姓名：</span><input type="text" name="name" value="">
    <span>性别：</span>
    <select name="checkbox">
      <option value="-1">请选择</option>
      <option value="1">男</option>
      <option value="0">女</option>
    </select>
    <button type="submit">搜索</button>
  </form>
    <table border="1">
      <thead>
      <tr>
        <td>序号</td>
        <td>姓名</td>
        <td>性别</td>
        <td>头像</td>
        <td>职业</td>
      </tr>
      </thead>
      <tbody>
      <c:forEach items="${list}" var="list">
        <tr>
          <td>${list.id}</td>
          <td>${list.name}</td>
          <td>
            <c:if test="${list.sex==1}">
              男
            </c:if>
            <c:if test="${list.sex==0}">
              女
            </c:if>
          </td>
          <td><img src="img/${list.headUrl}" style="width: 50px;height: 50px"></td>
          <td>${list.profession}</td>
        </tr>
      </c:forEach>
      </tbody>
    </table>
    <button>首页</button>
    <button>上一页</button>
    <button>下一页</button>
    <button>尾页</button>
  </body>
</html>
